// TOWN SCRIPT
//    Town 6: Tangramayne

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documentation. States you write
// yourself should be numbered from 10-100.

// flags:
// 6, 0 = entry message flag
// 6, 1 = need to talk to Charlie to show path to mine

begintownscript;

variables;

short choice;

body;

beginstate INIT_STATE;
	turn_off_training(TRUE);
	set_crime_tolerance(5);

	set_name(6, "Charlie");
	set_char_dialogue_pic(6, 549, 0);
	set_name(7, "Lucy");
	set_char_dialogue_pic(7, 547, 0);
	set_name(8, "Elyssa");
	set_char_dialogue_pic(8, 545, 0);
	set_name(9, "Nivius");
	set_char_dialogue_pic(9, 544, 0);
	set_name(10, "Scabban");
	set_char_dialogue_pic(10, 548, 0);
	set_name(11, "Kira");
	set_char_dialogue_pic(11, 546, 0);
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_flag(6, 0) == FALSE) {
		set_flag(6, 0, TRUE);
		reset_dialog();
		add_dialog_str(0, "The town of Tangramayne is somewhat unique in The Wilderness.", 0);
		add_dialog_str(1, "Even without walls, it somehow manages to survive without being overrun.", 0);
		add_dialog_str(2, "The town used to support a mix of mining and agricultural activities, but now is only agricultural.", 0);
		add_dialog_str(3, "There still are a few miners around, hoping one day to return to the regions mine.", 0);
		add_dialog_choice(0, "Ok");
		choice = run_dialog(TRUE);
	}

	if (get_ran(1, 0, 100) < 11) {
		if (get_ran(1, 0, 100) < 50) {
			text_bubble_on_char(20, "Meow");
		}
		else {
			text_bubble_on_char(20, "Purrrrr");
		}
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(21, "Baaaaa");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(22, "Bleeet");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(23, "Baa Baa");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(24, "Moooo");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(25, "Moo Moo");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(26, "Mooooooo");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(27, "Scrunch Scrunch");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(28, "Cluck Cluck");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(29, "Squawk!");
	}
	if (get_ran(1, 0, 100) < 11) {
		text_bubble_on_char(30, "Peck Peck");
	}
break;

beginstate 10;
break;
